/*****************************************************************************/
/* File: NewGameState.h                                                    */
/* Author: rszulgo                                                           */
/*                                                                           */
/* Description:																 */
/* Class for the submenu of 'New Game' for choice of 1/2 players mode		 */
/*****************************************************************************/
#pragma once
#include "State.h"
#include "Font.h"
#include "GameState.h"
#include "TextControl.h"
#include <vector>

// Specialization of the CState class for 
// the submenu state. This displays a submenu in which
// the player can start a new game in 1 player mode, 
// 2 players mode or back to the main menu.
class CNewGameState : public CState
{
public:
	~CNewGameState(void);

	void getKeyPressed();
	void Draw();
	void EnterState();

	static CNewGameState* GetInstance(CStateManager* pManager, CRenderer* pRenderer, HDC hDC, HWND hWnd);

protected:
	CNewGameState(CStateManager* pManager, CRenderer* pRenderer, HDC hDC, HWND hWnd);

private:
	// The player went up or down in 
	// the menu
	void SelectionUp();
	void SelectionDown();

	// The player validated the current selection
	void SelectionChosen();

	// add an item to the menu list
	int AddItem(CTextControl* pTextControl);

	// Index of the current selected menu item
	int m_iCurrentSelection;

	// A pointer to the current active game (if any).
	CGameState* m_pCurrentGame;

	//vector of menu items
	vector<CTextControl*> m_vMenuItems;

	//pointer to render device object
	CRenderer* m_pRenderer;	
};